Skip to content

Fix rejected/silently-dropped request fields SDK-wide; omvs_audit Java checks; new Egeria APIs (ISSUE-163/164/165) - #483

Merged
dwolfson merged 18 commits into
odpi:mainfrom
dwolfson:fix/role-appointment-class-names
Oct 23, 2026
Merged

dwolfson merged 18 commits into
odpi:mainfrom
dwolfson:fix/role-appointment-class-names

Conversation

@dwolfson

Copy link
Copy Markdown
Member

Summary

This started from a report that linking a role to a profile used the wrong class name. The fix grew into an SDK-wide sweep for request bodies Egeria rejects or silently ignores, done with a new mode of scripts/omvs_audit.py that checks against Egeria's Java source. It also adds the APIs the refreshed .http files document that pyegeria lacked. Details and evidence are in PYEGERIA_ISSUES.md ISSUE-163, ISSUE-164 and ISSUE-165.

Fixes (ISSUE-163, ISSUE-164)

  • Role appointments: link_person/team/it_profile_role_to_* sent Person/Team/ITProfileAppointmentProperties, which don't exist (a 400 with no body). They now send *RoleAppointmentProperties. Dr.Egeria's Link IT Profile Role Appointment called a non-existent SDK method.
  • Anchor scope could never be set: anchorScopeGUIDs was serialised as anchorScopeGuids, which Egeria drops, and the documented spelling was dropped client-side. Fixed on the New/Relationship/Template/Action models; this affects about 230 methods.
  • find_* options silently ignored: the shared find helper sent zoneFilter, relationshipPageSize and anchorScopeGuid, which pyegeria's own model discards. It now uses the real field names.
  • Wrong delete/detach body classes, a 400 under Egeria's polymorphic DeleteRequestBody: detach_it_profile_role_from_it_profile, detach_identity_from_profile, remove_is_abstract_concept (failed on every call), remove_activity_description, remove_is_context_definition, detach_cohort_member, remove_search_keyword, delete_actor_role, delete_contribution_record.
  • initiate_engine_action: Egeria's names are InitiateEngineActionRequestBody, actionSourceGUIDs and startDate. Before, a scheduled start time was dropped.
  • Other class and field names: DataValueMeaningProperties, SolutionActorRoleProperties, DataProcessingPurposeProperties. ActionRequestBody gains its anchor fields and newActionTargets; My Profile's isOwnAnchor was being dropped. TemplateRequestBody gains parentRelationshipProperties and sends replacementClassifications, which also covers part of ISSUE-155 item 4.
  • Dr.Egeria / CLI keys: endsWith was misspelled endWith; anchor-scope keys fixed; the CLI glossary update now sends properties; the CLI todo UpdataElementRequestBody typo is fixed.
  • Subject-area hierarchy link/detach pointed at URLs Egeria never served; repointed (ISSUE-165).

New APIs (ISSUE-155 items 5 and 6; ISSUE-159's restore proposal)

  • ClassificationExplorer: add/update/clear_usage_activity, add/update/clear_member_popularity_profile.
  • MetadataExpert: undo_metadata_element_update, restore_metadata_element, undo_related_elements_update, restore_related_elements.
  • New ProductCatalog client (EgeriaTech.product_catalog) with find_digital_product_catalogs on the product-catalog view service. It overlaps by name with ProductManager.find_digital_product_catalogs, which uses the product-manager URL marker; the facade still resolves to ProductManager.

omvs_audit.py

With an Egeria checkout (--java-dir, default ~/localGit/egeria-v6/egeria) the audit now reports these against the Spring @RequestBody types, registered @JsonSubTypes names and aliases, and DTO fields:

  • JAVA-BODY REJECTED / CLASS-IGNORED
  • UNKNOWN-CLASS
  • FIELD-DROP and CLIENT-DROP (silently dropped fields)
  • MODEL-FIELD gaps
  • JAVA-MISSING, with a MOVED? tag, and --live confirmation against the platform's OpenAPI doc
  • HTTP-vs-JAVA

RENAMED matches now get the verb/body checks too. On the pre-fix code the audit flags all eight ISSUE-163 bugs. It now reports 0 REJECTED and 0 MISSING.

Not changed (documented)

  • ISSUE-165: 17 SDK methods still call endpoints Egeria doesn't serve. 13 were removed upstream (the commits are cited); the rest never existed. The owner is raising them with the Egeria team. They include the endpoint behind Dr.Egeria's View Governance Definition Context.
  • Three filters Egeria has no server-side field for: get_tech_types_for_open_metadata_type(tech_name=), get_endpoints_for_asset(name=), find_software_capabilities(property_names=).
  • Template typeName: still open under ISSUE-155 item 4.
  • cascadeDelete: still ISSUE-132.

Test plan

  • Micro-tests: 1,472 pass. New: test_role_appointment_class_names.py, test_issue164_silent_field_drops.py, test_new_egeria_apis_2026_10_23.py, test_omvs_audit_java_truth.py. Each fix's tests fail on the old code. test_automated_curation_engine_action.py was updated: it had pinned the old wrong body.
  • Live on quickstart 9443, peer-cleared runs with throwaway pyeg-test:: elements, every GUID read back as gone:
    • role-appointment links and detaches
    • anchor scope stored
    • four glossary-term classification add/removes, verified in elementHeader.glossaryTermKinds
    • UsageActivity / MemberPopularityProfile stored, updated and cleared
    • undo of an element and of a relationship update
    • restore of a deleted term, a removed relationship and a Memento-archived term (same GUID, original qualifiedName)
    • subject-area hierarchy link/detach
    • product-catalog find
  • Not verified live:
    • find zone filter (wire-level only)
    • remove_search_keyword
    • detach_cohort_member
    • initiate_engine_action (would launch a real governance action)

🤖 Generated with Claude Code

…(ISSUE-163)

- link_person/team/it_profile_role_to_*: default properties class is now
  Person/Team/ITProfileRoleAppointmentProperties (old names don't exist in
  Egeria; a no-body call got HTTP 400).
- detach_it_profile_role_from_it_profile, detach_identity_from_profile:
  send DeleteRelationshipRequestBody (was DeleteElementRequestBody, 400 live).
- delete_actor_role, delete_contribution_record: send DeleteElementRequestBody.
- GlossaryManager.remove_is_context_definition: DeleteClassificationRequestBody.
- Dr.Egeria Link IT Profile Role Appointment called a non-existent SDK method.

Verified against ActorManagerResource.java / GlossaryManagerResource.java and
live on quickstart 9443. 11 micro-tests, 9 fail on the old code.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…a source (ISSUE-164)

- RENAMED (verb+path) matches now get the verb/body checks; they were skipped,
  which hid two ISSUE-163 detach bugs.
- New Java ground truth (--java-dir / $EGERIA_JAVA_DIR, --no-java to skip):
  indexes Spring endpoints -> @RequestBody type and reports
  JAVA-BODY REJECTED (sibling class under a @JsonTypeInfo base: a 400),
  CLASS-IGNORED, UNKNOWN-CLASS (Properties/RequestBody names Egeria lacks,
  scanned in pyegeria/omvs, md_processing and commands), JAVA-MISSING and
  HTTP-vs-JAVA. A .http BODY mismatch Java contradicts no longer fails.
- Strips the 'retrieve"}' junk on some .http lines.

On the pre-ISSUE-163 code it flags all eight ISSUE-163 bugs.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…E-163's audit note

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…SSUE-164)

- FIELD-DROP: a method passes an argument whose JSON key the server-side
  class (with ancestors) does not declare; Egeria's ignoreUnknown=true
  discards it without error. Helper argument -> JSON key maps are read from
  each helper's dict literals, following local aliases; a parameter counts
  as dropped only if every key it can fill is dropped.
- CLIENT-DROP: a dict naming a pyegeria model via "class" uses a key the
  model reads neither as alias nor field name, so Pydantic drops it before
  sending.
- MODEL-FIELD gaps (review): model fields the Java class lacks, per pair,
  with the methods using it.
- Java field index honours @JsonProperty, skips statics, and excludes
  adapters/ (connector DTOs reuse API class names).

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…d1a7f1

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…164)

- NewElementRequestBody / NewRelationshipRequestBody / TemplateRequestBody:
  anchor_scope_guids now serialises as anchorScopeGUIDs (Egeria's
  MakeAnchorOptions name). The generated alias anchorScopeGuids was dropped
  by Egeria, and the documented anchorScopeGUIDs by extra='ignore', so anchor
  scope could never be set. All three spellings are still read.
- _async_find_request (every find_*): send governanceZoneFilter,
  relationshipsPageSize, anchorScopeGUID and startFrom instead of zoneFilter,
  relationshipPageSize, anchorScopeGuid and start_from, which the model
  discarded; the property-names branch now sends the zone filter too. Removed
  anchorTypeName, which no Egeria options class has.

5 micro-tests, all fail on the old code.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…ith --live results

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Each verified against Egeria main 4486d1a7f1's Spring resources and
@JsonSubTypes registrations (registered names and aliases):
- remove_is_abstract_concept, remove_activity_description: send
  DeleteClassificationRequestBody (was an element / relationship body).
- detach_cohort_member: relationship delete; the metadata-source helper
  always sent MetadataSourceRequestBody, not a DeleteRequestBody subtype.
- remove_search_keyword: element delete, as Egeria declares.
- initiate_engine_action: InitiateEngineActionRequestBody with
  actionSourceGUIDs and startDate; requestSourceGUIDs and startTime were
  dropped, so a scheduled action started at once.
- add/remove_is_data_value default DataValueMeaningProperties;
  solution roles SolutionActorRoleProperties; GOV_DEF_PROPERTIES_LIST
  DataProcessingPurposeProperties; CLI todo update UpdateElementRequestBody
  (typo failed client-side validation).

Left alone on purpose: RetentionClassificationProperties and
SecurityGroupMembershipProperties are registered aliases.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…d classes

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…eys (ISSUE-164)

- ActionRequestBody: anchorGUID, isOwnAnchor, anchorScopeGUIDs,
  initialClassifications and newActionTargets (Egeria's names; the old
  actionTargetGUIDs key is still read). My Profile's isOwnAnchor on
  to-dos/meetings/reviews was being dropped client-side.
- TemplateRequestBody: parentRelationshipProperties added;
  initial_classifications now serialises as replacementClassifications,
  Egeria's template name for it (the old key is still read).
- Dr.Egeria set_find_body: endsWith (was endWith, ignored); set_create_body:
  anchorScopeGUIDs list (was a singular key, dropped); create/update bodies no
  longer send governanceZoneFilter, which Egeria's create/update bodies lack.
- CLI glossary actions: anchorScopeGUIDs list; update sends properties (was
  elementProperties, so the update carried no properties).

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…tadata Expert still has a classifications list

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
… product catalog

From the refreshed .http collections, checked against Egeria main 4486d1a7f1
(Spring @RequestBody types and registered properties classes):
- ClassificationExplorer: add/update/clear_usage_activity and
  add/update/clear_member_popularity_profile (New/Update/Delete classification
  bodies; UsageActivityProperties, MemberPopularityProfileProperties).
- MetadataExpert: undo_metadata_element_update, restore_metadata_element,
  undo_related_elements_update, restore_related_elements
  (MetadataSourceRequestBody; Egeria returns VoidResponse).
- New ProductCatalog client (pyegeria, EgeriaTech "product_catalog"):
  find_digital_product_catalogs on the product-catalog URL marker. It
  inherits CollectionManager without changing its root, so facade resolution
  of inherited methods is unchanged.

omvs_audit now reports 0 MISSING (was 13). 9 micro-tests.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…'t serve

Validated against Egeria main 4486d1a7f1, the live platform's OpenAPI doc,
and git history: 13 removed upstream (with removing commit), 6 never existed,
plus the Dr.Egeria command affected and proposed handling.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…; ISSUE-165 move check

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
link_subject_area_hierarchy / detach_subject_area_hierarchy called
subject-area/collections/{g}/collection-hierarchies/{g}/..., which Egeria
never served (404). SubjectAreaResource maps
subject-area/subject-areas/{parent}/subject-area-hierarchies/{nested}/...;
link_subject_areas / detach_subject_areas already used it, so these were
broken duplicates. Both names kept.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…ivity updates

UsageActivity / MemberPopularityProfile, undo/restore (element and
relationship; restore also reverses a Memento archive, keeping the GUID and
original qualifiedName), subject-area hierarchy and product-catalog find
verified on quickstart 9443. Update docstrings now say to send every count:
Egeria's counts are primitive longs, so an omitted count resets to 0 even
with mergeUpdate. Marks ISSUE-155 items 4 (partly), 5, 6 and ISSUE-159's
restore proposal.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…lass-names

Resolved the only conflict, PYEGERIA_ISSUES.md: both PRs inserted entries at
the top of "Open pyegeria items". Kept both, newest first: ISSUE-165, 164,
163, then 162.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson merged commit f353862 into odpi:main Oct 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant